    
<?php
$userErr = "";
$passErr = "";
$emailErr = "";
$walletErr = "";

session_start();

if (isset($_SESSION['usuId'])) {
  //El usuario esta loguiado.
  header('Location: referalPanel.php');
}

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
  //session_start();

  if (isset($_SESSION['usuId'])) {
    //El usuario esta loguiado.
    //header('Location: ../login.php');
    echo "hola";
  }
}
?>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Social Media Tool - User Register</title>
  </head>
  <body>
    <form action="<?= htmlspecialchars('controller/loginController.php'); ?>" method="post" >
      <table>
        <tr>
          <td>
            user
          </td>
          <td>
            <input name="user" />
            <span class="error">* <?php echo $userErr; ?></span>
          </td>
        </tr>
        <tr>
          <td>
            pass
          </td>
          <td>
            <input type="password" type="text" name="pass" />
            <span class="error">* <?php echo $passErr; ?></span>
          </td>
        </tr>
        <tr>
          <td>
          </td>
          <td>
          </td>
        </tr>
        <tr>
          <td>
            <input type="reset" name="reset" value="cancel" />
          </td>
          <td>
            <input type="submit" name="login" value="login" />
          </td>
        </tr>                                
      </table>
    </form>
  </body>
</html>